﻿using System.Web;
using System.Web.Optimization;

namespace MyBlog
{
    public class BundleConfig
    {
        // 有关 Bundling 的详细信息，请访问 http://go.microsoft.com/fwlink/?LinkId=254725
        public static void RegisterBundles(BundleCollection bundles)
        {
            //js css 需要全部在这加载，否则找不到，因为mvc4默认启用压缩功能，作用是将单次引用的资源文件压缩，减少请求数量和带宽，关闭压缩功能用下面这句代码
            //BundleTable.EnableOptimizations = false;
            bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                        "~/Scripts/jquery-1.8.2.js",
                        "~/Scripts/jquery.validate*",
                        "~/Scripts/jquery.unobtrusive-ajax*",
                        "~/Scripts/JQEasyTabs/jquery.easytabs.js",
                        "~/Scripts/JQEasyTabs/jquery.hashchange.min.js",
                        "~/Scripts/layer/layer.js",
                        "~/Scripts/Blog/BlogCommon.js",
                        "~/Scripts/jquery.cookie.js"
                        ));

            bundles.Add(new ScriptBundle("~/loginJs").Include("~/Scripts/Blog/Login.js"));

            bundles.Add(new ScriptBundle("~/regJs").Include("~/Scripts/Blog/Register.js"));

            //bundles.Add(new StyleBundle("~/layerCss").Include(
            //    "~/Scripts/layer/skin/layer.css"
            //    ));

            bundles.Add(new StyleBundle("~/Content/css").Include(
                "~/Content/CommonStyle.css",
                "~/Content/JqueryEasyTab.css",
                "~/Content/Pagerstyle.css",
                "~/Scripts/jBox/jBox.css"
                ));

        }
    }
}